﻿@{
    Layout = null;
}
@model MyBlog.Model.AccountModel
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>用户登录 - 小博客</title>
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/loginJs")
    @Styles.Render("~/Content/css")
    <link href="~/Content/Font-Awesome/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/Content/Font-Awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="~/Content/Blog/login.css" rel="stylesheet" />
</head>
<body class="login_body">
    <img id="layer-bg" class="layer-bg" src="~/Content/Images/body-bg1.jpg" />
    <div class="topnav">
        @{Html.RenderAction("_BlogHead", "Home");}
    </div>
    <div class="loginlogo">欢迎来到小博客</div>
    <div class="login">
        <div style="padding:20px 0px 5px 30px;">
            @using (Ajax.BeginForm(new AjaxOptions { HttpMethod = "Post", OnBegin = "Begin", OnSuccess = "Success", OnFailure = "Fail" }))
            {
                var usercookie = CookieHelper.GetCookie("userinfo");
                var uname = usercookie == null ? "" : usercookie.Values["account"].ToString();
                var pwd = usercookie == null ? "" : usercookie.Values["password"].ToString();
                <div class="block">
                    <label class="lbl">用户名</label><br />
                    @Html.TextBoxFor(x => x.Account, new { Value = uname, @class = "inputbox inputFilter", placeholder = "请输入用户名", maxlength = 20 })
                    <span class="red">*@Html.ValidationMessageFor(x => x.Account)</span>
                </div>
                <div class="block">
                    <label class="lbl">密码</label><br />
                    @Html.PasswordFor(x => x.Password, new { Value = pwd, @class = "inputbox", placeholder = "请输入密码", maxlength = 250 })
                    <span class="red">*@Html.ValidationMessageFor(x => x.Password)</span>
                </div>
                <div class="block"><input type="checkbox" id="chkRemember" checked="checked" name="isRemember" value="true" />记住密码</div>
                <div class="block">
                    <input class="login-btn" type="submit" value="立即登录" />&nbsp;&nbsp;
                    <span class="red" id="loginErr"></span>
                    @Html.HiddenFor(x => x.Islogin, new { Value = true })
                    @if (usercookie != null)
                    {
                        @Html.HiddenFor(x => x.IsEncrypt, new { Value = true })
                    }
                </div>
                <div style="line-height:1.8; ">
                    <span><i class="icon-double-angle-right"></i> <a title="进入小博客首页" href="/">小博客首页</a></span>
                    <br />
                    <span><i class="icon-double-angle-right"></i> <a title="注册成为我们的一员" href="@Url.Content("~/account/register")">没有帐号？立即注册</a></span>
                    <br />
                    <span><i class="icon-double-angle-right"></i> <a title="用您的注册邮箱找回您的密码" href="@Url.Content("~/account/findpwd")">忘记密码？</a></span>
                    <br />
                    <span><i class="icon-double-angle-right"></i> <a title="将您的建议或者您发现的问题反馈给我们" href="@Url.Content("~/system/buglist")">我要提Bug</a></span>
                </div>
            }
        </div>
        <div class="custo-login">
            <div style="margin-bottom:10px;">使用第三方帐号直接登录</div>
            <a href="javascript:;" id="qq-login" title="QQ帐号登录"><img src="~/Content/Images/QQ-login2.png" /></a>&nbsp;
            <a href="javascript:;" id="wb-login" title="新浪微博帐号登录"><img src="~/Content/Images/wb-login.png" /></a>
        </div>
    </div>
</body>
</html>